<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in.5</name>
<id>-1</id>
<cardCount>12</cardCount>
<cardID>2966</cardID>
<listID>7899</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>on openStackglobal val,forceput 0 into forcehide message boxhide field remput the seconds/86400 + 16480.5 + 5/24 into jd2put trunc(jd2+24000000) +1 into jdget the dateconvert it to dateItemsput item 2 of it into mput item 3 of it into dput false into valif m>4 and m<=10 then put true into valput trunc(jd-7*trunc(jd/7)) into wif m=4 and d>w then put true into valif m=10 and (d-w)>=25 then put false into valpush cardif the number of this cd is 1 thenput line 2 of card field "Algol" into eclrepeatif ecl > jd2 then exit repeatadd 2.8673075 to eclend repeatset numberFormat to "0.0"put "Next minimum of Algol occurs in" && (ecl-jd2)*24 &&¬"hours at JD=" into line 1 of card field Algolset numberFormat to "0.###"put ecl+2400000 after line 1 of card field Algolput ecl into line 2 of card field Algolend ifset numberFormat to "0.######"end openStackfunction TJDDateget the secondsadd 86400+3600*(12+DSTcheck()) to itconvert it to long dateput char 1 to (offset(",",third word of it)-1) of third word of it ¬&& second word of it && last word of it into hereturn heend TJDDatefunction getDateget the long dateput char 1 to (offset(",",third word of it)-1) of third word of it ¬&& second word of it && last word of it into hereturn heend getDatefunction getJDDateget the secondsadd 3600*(12+DSTcheck()) to itconvert it to long dateput char 1 to (offset(",",third word of it)-1) of third word of it ¬&& second word of it && last word of it into hereturn heend getJDDatefunction getUTDateget the secondsadd 3600*(DSTcheck()) to itconvert it to long dateput char 1 to (offset(",",third word of it)-1) of third word of it ¬&& second word of it && last word of it into hereturn heend getUTDatefunction DSTcheckget first word of line 4 of card field Coords of first cdif hilite of bkgnd button "DST"then put it-1 into tempelse put it into tempreturn tempend DSTcheckon dayOfYear-- returns day, dayUT as number of day in yearglobal dayUT,day,daySecsput the date into daySecsconvert daySecs to secondsput number of chars of the date into ndateput "12/31/" & (char ndate-1 to ndate of the date)-1 into Jan0convert Jan0 to secondsput (daySecs-Jan0)/86400 into dayput (daySecs-Jan0+3600*DSTcheck())/86400 into dayUTend dayOfYearon cheb a,b,cglobal x,xa,xbput 2*x*a-b+c into tempput a into xbput temp into xaend chebon UTglobal day,daySecs,x,xa,xb,mdayOfYear -- gets daySecsget ((the seconds-daySecs)/3600+DSTcheck())mod 24put trunc(it) into hput trunc(60*(it-h)) into mif m<10 then put "0" before mput "Universal Time = "& h &":" & m into line 1 of field 1put it into line 2 of field 1end UTon STglobal day,daySecs,x,xa,xb,dayUTdayOfYear -- gets dayput (dayUT-1)/183-1 into xput 0 into aput 0 into bput 7 into irepeat until i=0cheb a,b,word i+1 of card field "Sidereal Cheb" of card 1put xa into aput xb into bsubtract 1 from iend repeatput xb into b2cheb a,b,word 1 of card field "Sidereal Cheb" of card 1get ((xa-b2)/2+((the seconds-daySecs)/3600+DSTcheck())*1.00273791-¬(line 2 of card field "coords" of card 1)/15+24) mod 24put trunc(it) into hput trunc(60*(it-h)) into mif m<10 then put "0" before mput "Sidereal Time = "& h &":" & m into line 1 of field 2put it into line 2 of field 2end STon hm decvglobal it,h,mput trunc(it) into hput trunc(60*(it-h)) into mif decv then put abs(m) into mif m<10 then put "0" before mend hmon calc num,forceset cursor to 1001-- calcs ra and decput pi/180 into facglobal day,daySecs,x,xa,